<?php
namespace Admin\Controller;
use Think\Controller;
class UserController extends CommonController {
	public function _initialize(){
		
		parent::check();
	}
	//会员管理页面
    public function ulist(){
		$id		= I('get.id');
		$act	= I('get.act');
		
		$User = M('User');
		
		if( $act == 't_del'){
			$ret = $User->where("id={$id}")->delete();
			
			if( $ret == false){
				$this->error('删除失败');
			}
			$this->success('删除成功');
		}
		
		$list = $User->order('addtime desc')->select();//查询
		
		if( $list == false){
			$this->error($User->getError());
		}
		
		$this->assign('list',$list);
        $this->display();
    }
}
